package celiasoft.itasalib.structures;

import java.util.Date;
import java.util.Locale;

import celiasoft.itasalib.staticdata.ItasaStaticUrls;


public class Subtitle extends DataElement {
	
	private SubsVersion _version;
	
	private String _filename;
	private String _filesize;
	private String _filetype;
	private String _description;
	private int _downloads = -1;
	private Date _submitDate;
	private int _showId = -1;
	private String _showName;
	private String _submittedBy;
	

	public Subtitle(int id, String name) {
		super(id, name);
	}

	public Subtitle(int id) {
		super(id, null);
	}
	
	/**
	 * @return the version
	 */
	public SubsVersion getVersion() {
		return _version;
	}

	/**
	 * @param version the version to set
	 */
	public void setVersion(SubsVersion version) {
		_version = version;
	}

	/**
	 * @return the filename
	 */
	public String getFilename() {
		return _filename;
	}

	/**
	 * @param filename the filename to set
	 */
	public void setFilename(String filename) {
		_filename = filename;
	}

	/**
	 * @return the filesize
	 */
	public String getFilesize() {
		return _filesize;
	}

	/**
	 * @param filesize the filesize to set
	 */
	public void setFilesize(String filesize) {
		_filesize = filesize;
	}
	
	@Override
	public String toString() {
		return "Subtitle [id=" + getId() +  ", name=" + getName() + ", version=" +  _version + "]";
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return _description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		_description = description;
	}

	/**
	 * @return the submitDate
	 */
	public Date getSubmitDate() {
		return _submitDate;
	}

	/**
	 * @param submitDate the submitDate to set
	 */
	public void setSubmitDate(Date submitDate) {
		_submitDate = submitDate;
	}

	/**
	 * @return the showName
	 */
	public String getShowName() {
		return _showName;
	}

	/**
	 * @param showName the showName to set
	 */
	public void setShowName(String showName) {
		_showName = showName;
	}

	/**
	 * @return the submittedBy
	 */
	public String getSubmittedBy() {
		return _submittedBy;
	}

	/**
	 * @param submittedBy the submittedBy to set
	 */
	public void setSubmittedBy(String submittedBy) {
		_submittedBy = submittedBy;
	}

	/**
	 * @return the downloads
	 */
	public int getDownloads() {
		return _downloads;
	}

	/**
	 * @param downloads the downloads to set
	 */
	public void setDownloads(int downloads) {
		_downloads = downloads;
	}

	/**
	 * @return the showId
	 */
	public int getShowId() {
		return _showId;
	}

	/**
	 * @param showId the showId to set
	 */
	public void setShowId(int showId) {
		_showId = showId;
	}

	/**
	 * @return the filetype
	 */
	public String getFiletype() {
		return _filetype;
	}

	/**
	 * @param filetype the filetype to set
	 */
	public void setFiletype(String filetype) {
		_filetype = filetype;
	}
	
	/* (non-Javadoc)
	 * @see celiasoft.itasalib.structures.DataElement#getLink()
	 */
	@Override
	public String getLink() {
		return String.format(Locale.ITALY, ItasaStaticUrls.BASE_URL_SUBS_WEB_PAGE, this.getShowId());
	}
	
}
